import * as types from '../constants/ActionTypes';

// 模拟服务器返回的用户信息
let user = {
    'name': 'admin',
    'age': '24'
}

// 执行登录
export function doLogin() {
    return {
        type: types.LOGIN_IN_DOING
    }
}

// 正在登录
export function isLogining() {
    return {
        type: types.LOGIN_IN_INIT
    }
}

// 登录完成
export function loginSuccess(isSuccess, user) {
    return {
        type: types.LOGIN_IN_DONE,
        isSuccess: isSuccess,
        user: user
    }
}
